package org.jeecg.modules.gis.util;

import dm.jdbc.driver.DmdbConnection;

import java.sql.Connection;
import java.sql.SQLException;

public class DmUtil {
    /**
     * 获取 DmdbConnection 对象（适用于达梦数据库）
     */
    public static DmdbConnection getDmdbConnection(Connection conn) throws SQLException {
        if (conn instanceof DmdbConnection) {
            return (DmdbConnection) conn;
        }
        return conn.unwrap(DmdbConnection.class);
    }
}
